import Vue from 'vue'
import Router from 'vue-router'
import login from '@/components/login'
import cpass from '@/components/cpass'
import uppass from '@/components/uppass'
import main from '@/components/main'
import store from '@/components/store/store'
import initiation from '@/components/finance/initiation'
import editRoom from '@/components/store/editRoom'
import editStore from '@/components/store/editStore'
import editParMan from '@/components/partner/editParMan'
import accParMan from '@/components/partner/accParMan'
import reaccParMan from '@/components/partner/reaccParMan'
import server from '@/components/server/server'
import addServer from '@/components/server/addServer'
import accServer from '@/components/server/accServer'
import finance from '@/components/finance/finance'
import activity from '@/components/activity/activity'
import userMan from '@/components/user/userMan'
import staffMan from '@/components/staff/staffMan'
import subCommission from '@/components/partner/subCommission'
import partnerDetails from '@/components/partner/partnerDetails'
import serverDeatils from '@/components/server/serverDetails'
import addMan from '@/components/staff/addMan'
import setPass from '@/components/staff/setPass'
import permissionConfig from '@/components/staff/permissionConfiguration'
import activityDetail from '@/components/activity/activityDetail'

Vue.use(Router)
export default new Router({
  routes: [
    {
      path: '/',
      name: 'login',
      component: login
    },{
      path: '/cpass',
      name: 'cpass',
      component: cpass
    },{
      path: '/main',
      name: 'main',
      component: main,
      children: [
        {
          path:'uppass',
          name:'uppass',
          component: uppass
        },
        // 新增门店
        {
          path: 'addStore',
          name: 'addStore',
          component: () => import ( '@/components/store/editStore' )
        },  

        {
          path: '/',
          name:'store',
          component: store
        },{
          path: 'server',
          name:'server',
          component: server
        },{
          path: 'editParMan',
          name:'editParMan',
          component: editParMan
        },{
          path: 'addServer',
          name:'addServer',
          component: addServer
        },{
          path: 'reaccParMan',
          name:'reaccParMan',
          component: reaccParMan
        },{
          path: 'accServer',
          name:'accServer',
          component: accServer
        },{
          path: 'accParMan',
          name:'accParMan',
          component: accParMan
        },{
          path: 'finance',
          name:'finance',
          component: finance
        },{
          path: 'activity',
          name:'activity',
          component: activity
        },{
          path: 'userMan',
          name:'userMan',
          component: userMan
        },{
          path: 'staffMan',
          name:'staffMan',
          component: staffMan
        }, {
          path: 'subCommission',
          name: 'subCommission',
          component: subCommission
        }, {
          path: 'partnerDetails',
          name: 'partnerDetails',
          component: partnerDetails
        }, {
          path: 'serverDeatils',
          name: 'serverDeatils',
          component: serverDeatils
        }, {
          path: 'addMan',
          name: 'addMan',
          component: addMan
        }, {
          path: 'permissionConfig',
          name: 'permissionConfig',
          component: permissionConfig
        }, {
          path:'activityDetail',
          name: 'activityDetail',
          component: activityDetail
        }, {
          path:'setPass',
          name: 'setPass',
          component: setPass
        }, {
          path:'initiation',
          name: 'initiation',
          component: initiation
        }, {
          path:'editRoom',
          name: 'editRoom',
          component: editRoom
        }, {
          path:'editStore',
          name: 'editStore',
          component: editStore
        }
      ]
    }
  ]
})
